package com.example.demo.zaqizabatest.函数接口;

import java.util.function.BooleanSupplier;

/**
 * @ClassName BooleanSupplierTest  BooleanSupplier 不接受任何参数，且返回一个布尔类型的结果的操作
 * @Author lys4134
 * @Date 2021/08/13 15:23:57
 * @Description BooleanSupplierTest
 * @Version 1.0
 **/
public class BooleanSupplierTest {

    public static void main(String[] args) {
        eval(() -> AHelp.x > AHelp.y);
    }

    public static void eval(BooleanSupplier booleanSupplier) {
        boolean booleanSupplierAsBoolean = booleanSupplier.getAsBoolean();
        System.out.println(booleanSupplierAsBoolean);
    }
}
